package com.xueyi.system.maintenanceRecords.domain.po;

import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xueyi.common.core.web.tenant.base.TBaseEntity;
import com.xueyi.system.maintenanceRecords.domain.dto.MaintenanceRecordsDto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.xueyi.common.core.annotation.Excel;

import java.time.LocalDateTime;

/**
 * 维保记录 持久化对象
 *
 * @author zlf
 */
@TableName(value = "base_maintenance_records", excludeProperty = {"name", "sort"})
public class MaintenanceRecordsPo extends TBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 编码
     */
    @Excel(name = "编码")
    @TableField("code")
    private String code;

    /**
     * 维保对象id
     */
    @Excel(name = "维保对象id")
    @TableField("maintenance_id")
    private Long maintenanceId;

    /**
     * 维保对象
     */
    @Excel(name = "维保对象")
    @TableField("maintenance_object")
    private String maintenanceObject;

    /**
     * 维保类型
     */
    @Excel(name = "维保类型")
    @TableField("maintenance_type")
    private String maintenanceType;

    /**
     * 维保日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "维保日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("maintenance_time")
    private LocalDateTime maintenanceTime;

    /**
     * 状态
     */
    @Excel(name = "状态")
    @TableField("status")
    private String status;

    @TableField(value = "appendix", typeHandler = FastjsonTypeHandler.class)
    private JSONArray appendix;

    public JSONArray getAppendix() {
        return appendix;
    }

    public void setAppendix(JSONArray appendix) {
        this.appendix = appendix;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setMaintenanceId(Long maintenanceId) {
        this.maintenanceId = maintenanceId;
    }

    public Long getMaintenanceId() {
        return maintenanceId;
    }

    public void setMaintenanceObject(String maintenanceObject) {
        this.maintenanceObject = maintenanceObject;
    }

    public String getMaintenanceObject() {
        return maintenanceObject;
    }

    public void setMaintenanceType(String maintenanceType) {
        this.maintenanceType = maintenanceType;
    }

    public String getMaintenanceType() {
        return maintenanceType;
    }

    public void setMaintenanceTime(LocalDateTime maintenanceTime) {
        this.maintenanceTime = maintenanceTime;
    }

    public LocalDateTime getMaintenanceTime() {
        return maintenanceTime;
    }

    @Override
    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String getStatus() {
        return status;
    }

}
